<template>
  <!--<el-dialog :visible.sync="adddialog" width="80%" append-to-body @close="close">-->
  <!--<span>-->
  <div class="refine_dscreate">
    <h2 class="titleblue">
      <div style="float:left">{{title}}</div>
      <!--<div class="sumDuty">-->
        <!--<div @click="dutylogBtn" class="fr dutycreated" v-if="dutylog=='createDuty'">同步值班日志</div>-->
      <!--</div>-->
    </h2>
    <div class="contant duty_inset_dialog">
      <el-row v-show="detailsOperate" class="noprint">
        <el-button class="duty_action" @click="getPdf('总结')">导出</el-button>
        <el-button class="duty_action" type="primary" @click="printPage">打印</el-button>
      </el-row>
      <el-form ref="form" :model="form" id="wordd">
        <div id='pdfDom' ref='pdfDom'>
          <ul class="ul_print">
            <li class="li-1 li-height-47">所属机构</li>
            <li class="li-1 li-height-47 bgcolor-ccc"><span>{{detail.orgid}}</span></li>
<!--            <li class="li-1 li-height-47 bgcolor-ccc"><span v-if="$profile.organiza.level == 1">{{detail.orgid}}</span></li>-->
            <li class="li-1 li-height-47">所属部门</li>
            <li class="li-1 li-height-47 bgcolor-ccc"><span>{{detail.deptid}}</span></li>
<!--            <li class="li-1 li-height-47 bgcolor-ccc"><span v-if="$profile.organiza.level == 2">{{detail.deptid}}</span></li>-->
            <li class="li-1 li-height-47">当前日期</li>
            <li class="li-1 li-height-47 bgcolor-ccc">
              <el-date-picker v-model="form.today" align="right" type="date" placeholder="请选择日期" readonly
                              value-format='yyyy-MM-dd' :picker-options="pickerOptions">
              </el-date-picker>
            </li>
            <li class="li-1 li-height-47">值班人员</li>
            <li class="li-5 li-height-47" v-if="dutylog=='createDuty'||dutylog=='editDuty'">
              <el-input placeholder="请输入值班人员" v-model="form.usernames">
              </el-input>
            </li>
            <li class="li-5 li-height-47" v-if="dutylog=='lookDuty'" style="line-height:45px;">{{form.usernames}}</li>
            <!--<li class="li-5 li-height-47">
              <el-input placeholder="请输入值班人员" :readonly='detailsOperate' style="height:47px;" v-model="form.usernames">
              </el-input>
            </li>-->
            <li class="li-1 li-height-47">值班时间</li>
            <li class="li-5 li-height-47" v-if="dutylog=='createDuty'||dutylog=='editDuty'">
              <el-date-picker v-model="detail.dutytime" type="datetimerange" :picker-options="pickerOptions2"
                              value-format='yyyy-MM-dd HH:mm:ss'
                              range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right"
                              :default-time="['08:30:00', '08:30:00']">
              </el-date-picker>
            </li>
            <li class="li-5 li-height-47" v-if="dutylog=='lookDuty'">{{detail.dutytime[0]}}至{{detail.dutytime[1]}}</li>

            <li class="li-1 h-middle" :style="{'line-height':dheight}">值班总结</li>
            <li class="li-3 h-big height-171" v-if="dutylog=='createDuty'||dutylog=='editDuty'">
              <div class="duty-detail createText">
                <el-input class="textAreaContent" type='textarea' placeholder="请输入值班详情" v-model="form.description"></el-input>
              </div>
            </li>
            <li class="li-3" v-if="dutylog=='lookDuty'" ref='det'>
              <div class="duty-detail dutyDetail ">
                <!--<div>{{form.description}}</div>-->
                <div v-for='(item,index) in description' class='underline' :key='index'>{{item}}</div>
                <!-- <el-input type='textarea' :rows='7' disabled v-model="form.description" class="disabledIpt"></el-input> -->
              </div>
            </li>

            <!--<li class="li-3 h-middle" v-if="dutylog=='createDuty'||dutylog=='editDuty'">
              <el-input type="textarea" placeholder="请输入值班总结" v-model="form.summary">
              </el-input>
            </li>
            <li class="li-3 h-middle" v-if="dutylog=='lookDuty'" ref='det'>
              <div class="disabledIpt" readonly>{{form.summary}}</div>
              &lt;!&ndash; <el-input type='textarea' :rows="4" readonly v-model="form.summary" class="disabledIpt"></el-input> &ndash;&gt;
            </li>-->
            <li class="li-1 h-report">每日报表</li>
            <li class="li-3 reports-detail">
              <p>{{form.orgReport}}</p>
              <p>
                <label>VTS监控船舶</label>
                <el-input placeholder="" :readonly='detailsOperate' v-model="detail.monitor[0]"></el-input>
                <label>艘次，提供信息服务</label>
                <el-input placeholder="" :readonly='detailsOperate' v-model="detail.monitor[1]"></el-input>
                <label>次，</label>
                <label>纠正船舶违章行为</label>
                <el-input placeholder="" :readonly='detailsOperate' v-model="detail.monitor[2]"></el-input>
                <label>艘次；</label>
              </p>
              <p>
                <label>发生海上险情</label>
                <el-input placeholder="" :readonly='detailsOperate' v-model="detail.monitor[3]"></el-input>
                <label>起，事故</label>
                <el-input placeholder="" :readonly='detailsOperate' v-model="detail.monitor[4]"></el-input>
                <label>起。</label>
              </p>
            </li>
          </ul>
        </div>
      </el-form>
      <el-row :gutter="24" style="text-align: center;" v-if="dutylog!='lookDuty'">
        <el-button @click="save" class="cancel">保存</el-button>
        <el-button @click="sure" class="sure">提交</el-button>
        <el-button @click="close" class="cancel">取消</el-button>
      </el-row>
    </div>
  </div>
  <!--<keep-alive v-if='xinde'>-->
  <!--<transition name="move" mode="out-in">-->
  <!--<router-view :id='ddid' :dutylog="dutylog" @update='update' @close="close"></router-view>-->
  <!--</transition>-->
  <!--</keep-alive>-->
  <!--<router-view v-else :dutylog="dutylog" @update='update' @close="close"></router-view>-->
  <!--</span>-->
  <!--</el-dialog>-->
</template>

<script src="./DutySumEdit.js"></script>

<style lang="scss" src="./DutySumEdit.scss"></style>

<style lang="scss" scoped>
  .refine_createlog .duty-detail {
    height: 681px;
    width: 100%;
    display: block;
    line-height: 30px;
    box-sizing: border-box
  }
</style>
